package cn.ekuma.epos.bean.util.sale;

import java.util.Date;

import com.openbravo.bean.sales.KitchenWorkLine;
import com.openbravo.bean.sales.TicketLine;

public class KitchenLineHelper{

	public static KitchenWorkLine getKitchenWorkLineForTicketLine(String table,TicketLine l){
		KitchenWorkLine retLine=new KitchenWorkLine();
		retLine.setTableName(table);
		retLine.setAttributes(l.getAttributes());
		retLine.setAttsetinstid(l.getAttsetinstid());
		retLine.setCreatDate(new Date());
		retLine.setLineState(KitchenWorkLine.LINESTATE_wait);
		retLine.setTicketState(KitchenWorkLine.TICKETSTATE_editing);
		retLine.setMultiply(l.getMultiply());
		retLine.setProductid(l.getProductid());
		retLine.setTicketId(table);
		retLine.setTicketLineId(l.getTicketLine());
		retLine.setUrgent(false);
		retLine.setOrder(l.getTicketLine());
		return retLine;
	}
}
